package day14;

public class hw4Person {
    private String name;
    
    public hw4Person(String name) {
        this.name = name;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public void goToWork(hw4Vehicle vehicle) {
        System.out.println(name + "准备去公司当牛马");
        vehicle.start();
        vehicle.move();
        vehicle.stop();
        System.out.println(name + "到达公司开始工作");
    }
}